package com.jspgou.cms.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the jc_shop_paymentorder table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="jc_shop_paymentorder"
 */

public abstract class BaseShopPaymentorder  implements Serializable {

	public static String REF = "ShopPaymentorder";
	public static String PROP_FREIGHT = "freight";
	public static String PROP_PAYMENT_CODE = "paymentCode";
	public static String PROP_RECEIVE_ADDRESS = "receiveAddress";
	public static String PROP_RECEIVE_PHONE = "receivePhone";
	public static String PROP_CODE = "code";
	public static String PROP_PAYMENT = "payment";
	public static String PROP_STATUS = "status";
	public static String PROP_TRADENO = "tradeno";
	public static String PROP_RECEIVE_ZIP = "receiveZip";
	public static String PROP_ID = "id";
	public static String PROP_PRODUCT_NAME = "productName";
	public static String PROP_RECEIVE_MOBILE = "receiveMobile";
	public static String PROP_TOTAL = "total";
	public static String PROP_RECEIVE_NAME = "receiveName";


	// constructors
	public BaseShopPaymentorder () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseShopPaymentorder (Long id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseShopPaymentorder (
		Long id,
		com.jspgou.cms.entity.Payment payment,
		java.lang.String code,
		Double total,
		java.lang.String paymentCode) {

		this.setId(id);
		this.setPayment(payment);
		this.setCode(code);
		this.setTotal(total);
		this.setPaymentCode(paymentCode);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private long id;

	// fields
	private java.lang.String code;
	private java.lang.Double total;
	private java.lang.String paymentCode;
	private java.lang.String productName;
	private java.lang.Double freight;
	private java.lang.Integer status;
	private java.lang.String tradeno;
	private java.lang.String receiveName;
	private java.lang.String receiveAddress;
	private java.lang.String receiveZip;
	private java.lang.String receivePhone;
	private java.lang.String receiveMobile;

	// many to one
	private com.jspgou.cms.entity.Payment payment;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="Id"
     */
	public Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: code
	 */
	public java.lang.String getCode () {
		return code;
	}

	/**
	 * Set the value related to the column: code
	 * @param code the code value
	 */
	public void setCode (java.lang.String code) {
		this.code = code;
	}


	/**
	 * Return the value associated with the column: total
	 */
	public java.lang.Double getTotal () {
		return total;
	}

	/**
	 * Set the value related to the column: total
	 * @param total the total value
	 */
	public void setTotal (java.lang.Double total) {
		this.total = total;
	}


	/**
	 * Return the value associated with the column: payment_code
	 */
	public java.lang.String getPaymentCode () {
		return paymentCode;
	}

	/**
	 * Set the value related to the column: payment_code
	 * @param paymentCode the payment_code value
	 */
	public void setPaymentCode (java.lang.String paymentCode) {
		this.paymentCode = paymentCode;
	}


	/**
	 * Return the value associated with the column: productName
	 */
	public java.lang.String getProductName () {
		return productName;
	}

	/**
	 * Set the value related to the column: productName
	 * @param productName the productName value
	 */
	public void setProductName (java.lang.String productName) {
		this.productName = productName;
	}


	/**
	 * Return the value associated with the column: freight
	 */
	public java.lang.Double getFreight () {
		return freight;
	}

	/**
	 * Set the value related to the column: freight
	 * @param freight the freight value
	 */
	public void setFreight (java.lang.Double freight) {
		this.freight = freight;
	}


	/**
	 * Return the value associated with the column: status
	 */
	public java.lang.Integer getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (java.lang.Integer status) {
		this.status = status;
	}


	/**
	 * Return the value associated with the column: tradeno
	 */
	public java.lang.String getTradeno () {
		return tradeno;
	}

	/**
	 * Set the value related to the column: tradeno
	 * @param tradeno the tradeno value
	 */
	public void setTradeno (java.lang.String tradeno) {
		this.tradeno = tradeno;
	}


	/**
	 * Return the value associated with the column: receive_name
	 */
	public java.lang.String getReceiveName () {
		return receiveName;
	}

	/**
	 * Set the value related to the column: receive_name
	 * @param receiveName the receive_name value
	 */
	public void setReceiveName (java.lang.String receiveName) {
		this.receiveName = receiveName;
	}


	/**
	 * Return the value associated with the column: receive_address
	 */
	public java.lang.String getReceiveAddress () {
		return receiveAddress;
	}

	/**
	 * Set the value related to the column: receive_address
	 * @param receiveAddress the receive_address value
	 */
	public void setReceiveAddress (java.lang.String receiveAddress) {
		this.receiveAddress = receiveAddress;
	}


	/**
	 * Return the value associated with the column: receive_zip
	 */
	public java.lang.String getReceiveZip () {
		return receiveZip;
	}

	/**
	 * Set the value related to the column: receive_zip
	 * @param receiveZip the receive_zip value
	 */
	public void setReceiveZip (java.lang.String receiveZip) {
		this.receiveZip = receiveZip;
	}


	/**
	 * Return the value associated with the column: receive_phone
	 */
	public java.lang.String getReceivePhone () {
		return receivePhone;
	}

	/**
	 * Set the value related to the column: receive_phone
	 * @param receivePhone the receive_phone value
	 */
	public void setReceivePhone (java.lang.String receivePhone) {
		this.receivePhone = receivePhone;
	}


	/**
	 * Return the value associated with the column: receive_mobile
	 */
	public java.lang.String getReceiveMobile () {
		return receiveMobile;
	}

	/**
	 * Set the value related to the column: receive_mobile
	 * @param receiveMobile the receive_mobile value
	 */
	public void setReceiveMobile (java.lang.String receiveMobile) {
		this.receiveMobile = receiveMobile;
	}


	/**
	 * Return the value associated with the column: payment_id
	 */
	public com.jspgou.cms.entity.Payment getPayment () {
		return payment;
	}

	/**
	 * Set the value related to the column: payment_id
	 * @param payment the payment_id value
	 */
	public void setPayment (com.jspgou.cms.entity.Payment payment) {
		this.payment = payment;
	}

	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jspgou.cms.entity.ShopPaymentorder)) return false;
		else {
			com.jspgou.cms.entity.ShopPaymentorder shopPaymentorder = (com.jspgou.cms.entity.ShopPaymentorder) obj;
			return (this.getId() == shopPaymentorder.getId());
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}

	public String toString () {
		return super.toString();
	}


}